﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Common/Master/FrameMain.Master" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="Frame.Web.Admin.Dispatch.List" %>
<%@ Register src="../../Common/Controls/Footer.ascx" tagname="Footer" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="toolbar">
        <ul>
            <li><a id="lnkAdd" runat="server" href="javascript:go()"><span><b style="background-image: url(../../common/images/icons/addnew.gif);">
                &nbsp;</b><asp:Literal ID="Literal1" runat="server" Text="增加"></asp:Literal></span></a></li>
           <li><a id="lnkDelete" runat="server" href="javascript:go()"><span><b style="background-image: url(../../common/images/icons/DelUser.gif);">
                &nbsp;</b><asp:Literal ID="Literal4" runat="server" Text="删除"></asp:Literal></span></a></li>
          <li style="width:100px"><a id="lnkRestart" runat="server" href="javascript:go()"><span><b style="background-image: url(../../common/images/common/return.gif);">
                &nbsp;</b><asp:Literal ID="Literal2" runat="server" Text="重新启动"></asp:Literal></span></a></li>
            <li>
                <asp:Button ID="btnStop" runat="server" Text="停止" onclick="btnStop_Click" />
                <asp:Button ID="btnRestart" runat="server" Text="Button" CssClass="hide"
                    onclick="btnRestart_Click" />
                <asp:Button ID="btnRefresh" runat="server" Text="Button" OnClick="btnRefresh_Click"
                    CssClass="refresh" />
                <asp:Button ID="btnDelete" CssClass="hide" runat="server" Text="删除" OnClick="btnDelete_Click" CausesValidation="False" />
            </li>
         </ul>
    </div>
   
    <div id="head">
        <div class="left">
            <asp:Label ID="lblName" runat="server" Text="调度列表" Font-Bold="true"></asp:Label>
            [最后运行时间:<asp:Label ID="lblLastRunTime" runat="server" Text="lblLastRunTime"></asp:Label>]
            </div>
        
    </div>
    <div id="list">
        <asp:HiddenField ID="hidSelectIDs" runat="server" Value="" />
        <table id="lvList" cellpadding="0" cellspacing="0" border="0" width="100%">
            <tr id="lvHeader" runat="server">
                <th class="sp">
                    &nbsp;
                </th>
                <th class="chk">
                    <asp:CheckBox ID="chkSelectAll" runat="server" />
                </th>
                <th>
                    类名(包括程序集)
                </th>
                <th>
                    执行周期(分钟)
                </th>
                <th>
                    状态
                </th>     
                <th>
                    编辑
                </th>                         
            </tr>
            <asp:ListView ID="lv" runat="server" ItemPlaceholderID="items" 
                onitemdatabound="lv_ItemDataBound" >
                <LayoutTemplate>
                    <tr id="items" runat="server">
                    </tr>
                </LayoutTemplate>
                <ItemTemplate>
                    <tr id="row" runat="server">
                        <td class="sp">
                            &nbsp;
                        </td>
                        <td class="chk">
                            <asp:CheckBox ID="chkSelect" runat="server" />
                        </td>
                        <td>
                            <asp:HyperLink ID="lnkName" runat="server" NavigateUrl="javascript:;" Text='<%# Eval("Name") %>'
                            EnableViewState="False"></asp:HyperLink>
                        </td>
                        <td>
                            <%#Eval("Interval") %>&nbsp;
                        </td>
                        <td>
                            <%#((Frame.Lib.Core.Dispatch.DispatchState)(int)Eval("State")).ToString()%>&nbsp;
                        </td>    
                        <td>
                        <asp:HyperLink ID="lnkEdit" runat="server" EnableViewState="false" NavigateUrl="javascript:;"  Text='修改'></asp:HyperLink>
                        </td>                 
                       
                    </tr>
                </ItemTemplate>
                <EmptyDataTemplate>
                    <tr>
                        <td colspan="6" class="empty">
                            没有调度
                        </td>
                    </tr>
                </EmptyDataTemplate>
            </asp:ListView>            
        </table>       
    </div>
    
</asp:Content>
